<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{

            margin: 0;
            padding: 0;
        }
        #hostlist{
          padding: 10px;
          background-color: aquamarine;
        }
        .title{
           background-color: #f5f5f5;
           height: 50px;
           line-height: 50px;
        }
        .item {
            display: flex;
            box-sizing: border-box;
            justify-content: space-between;
            align-items: center;
            background-color: #fff;
            padding: 10px;
            margin-bottom: 20px;
        }
        .right{
            width: 80px;
            height: 40px;
            background-color: #fe5e3b;
            border-radius: 20px;
            color: #fff;
            text-align: center;
            line-height: 40px;
        }
        .left{
            display: flex;
            font-size: 12px;
        }
        .left img{
            margin-right: 10px;
        }
        .name{
            font-weight: 700;
        }
        .desc{
            color: red;
            margin-top: 10px;
        }
        .status{
            color: red;
            margin-top: 10px;
        }
        .store{
            color: gray;
        }
        .price{
            display: flex;
            justify-content: space-around;
        }
        figure{
            text-align: center;
        }
        figcaption{
            font-size: 18px;
            font-weight: 700;
        }
    </style>
</head>
<body>
    <div id="hostlist">
        <div class="title">
            <h2><饿了么</h2>
        </div>
        <div class="list">
            <h2>热门单品</h2>
            <div class="item" v-for="(item,index) in hostlist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.pic" alt="">
                    <div class="center">
                        <div class="name">{{item.name}}</div>
                        <div class="desc">{{item.desc}}</div>
                        <div class="status">{{item.status}}</div>
                        <div class="store">{{item.store}}</div>
                    </div>
                </div>
                <div class="right">
                    立即兑
                </div>
            </div>
        </div>
        <div class="foot">
            <h2>通用红包限量兑</h2>
            <div class="price">
                <figure>
                    <img src="../images/04.gif" alt="">
                    <figcaption>吃货联盟红包</figcaption>
                </figure>
                <figure>
                    <img src="../images/04.gif" alt="">
                    <figcaption>吃货联盟红包</figcaption>
                </figure>
                <figure>
                    <img src="../images/05.gif" alt="">
                    <figcaption>吃货联盟红包</figcaption>
                </figure>
            </div>
        </div>
    </div>
</body>
</html>
<script src="../vue-2.5.21.js"></script>
<script>
    var m = new Vue({
        el: '#hostlist',
        data: {
            hostlist:[
            { id: 1, pic: '../images/01.gif', name: '脐楫3斤快递到家', desc: '兑换后入手价8.9元', status: 10,store:'适用门店>' },
            { id: 1, pic: '../images/02.gif', name: '耙耙相2斤快递到家', desc: '兑换后入手价9.9元', status: 30,store:'适用门店>' },
            { id: 1, pic: '../images/03.gif', name: '脐楫3斤快递到家', desc: '兑换后入手价8.9元', status: 60,store:'适用门店>' },
            
    ]
        },
        
        computed: {}, //computed 定义计算属性
        watch: {}, //watch 定义数据监听
        methods: {}, //methods 定义方法(函数)
        filters: {}, //filters 定义过滤器
        directives: {}, //directives 定义自定义指令
        components: {}, //components 注册局部组件
    })
</script>